﻿using DeHeng_Mes.Model.Table;
using DeHeng_Mes.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeHeng_Mes.Dao
{
    public class PowerDao
    {


        public static void insertPower(TraceHourPower traceHourPower)
        {
            using (var db = SqlSugarConfig.Db)
            {
                db.Insertable(traceHourPower).ExecuteCommand();

                Tools.ProduceLogText($"采集到一条小时电能数据，耗电名称为{traceHourPower.PlcName}，小时耗电量为{traceHourPower.HourPower}");
            }
        }
    }
}
